import i18n from '@/locales/index'
const { t } = i18n.global

export const columns =  [
  {
    title: t('common.sequenceNo'), dataIndex: 'index', key: 'index', align: 'center', width: 50,
    customRender: ({ index }) => {
      return index + 1
    }
  },
  { title: t('video.monitorCode'), dataIndex: 'code', key: 'code', align: 'center', width: 130 },
  { title: t('video.monitorName'), dataIndex: 'name', key: 'name', align: 'center', width: 130 },
  { title: t('video.brandName'), dataIndex: 'brandName', key: 'brandName', align: 'center', width: 130 },
  { title: t('video.belongWaterLine'), dataIndex: 'hangerLineNo', key: 'hangerLineNo', align: 'center', width: 130 },
  { title: t('video.belongStation'), dataIndex: 'stationNo', key: 'stationNo', align: 'center', width: 130 },
  { title: t('video.deviceSerialNo'), dataIndex: 'deviceSerial', key: 'deviceSerial', align: 'center', width: 130 },
  { title: t('video.ipcSerialNo'), dataIndex: 'ipcSerial', key: 'ipcSerial', align: 'center', width: 130 },
  { title: t('common.state'), dataIndex: 'deviceStatus', key: 'deviceStatus', align: 'center', width: 80 },
  { title: t('common.startState'), dataIndex: 'status', key: 'status', align: 'center', width: 80 ,fixed: 'right'},
  { title: t('common.operate'), dataIndex: 'operate', key: 'operate', align: 'center', width: 130, fixed: 'right' }
] 

export const modalRules = {
  brand: [{ required: true, message: t('video.pleaseSelectBrand') }],
  deviceSerial: [{ required: true, message: t('video.pleaseInputDeviceSerialNo') }],
  // channelNo: [{ required: true, message: '请输入验证码' }],
  hangerLineId: [{ required: true, message: t('video.pleaseSelectWaterLine') }],
  stationId: [{ required: true, message: t('video.pleaseSelectStation') }]
}